<template>
    <div>
        <el-table
            :data="testList"
            stripe
            style="width: 100%">
            <el-table-column
            prop="name"
            label="考试名称"
            width="180">
            </el-table-column>
            <el-table-column
            prop="startTime"
            label="开始时间"
            width="180">
            </el-table-column>
            <el-table-column
            prop="endTime"
            label="截止时间">
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  import examApi from '@/api/exam'
  import classesApi from '@/api/classes'
  export default {
    computed: {
        ...mapGetters([
        'name',
        'id'
        ])
    },

    data(){
        return{
            testList:null,
        }
    },

    created () {
        this.TestList()
    },

    methods:{
        TestList(){
            examApi.getTestList(this.id).then( response =>{
                this.testList = response.data
            })
        }
    }
}
</script>

